package com.wide.core.shared.json;

/**
 * A core implementation of the GWT JSONString that can be used on both the client and the server.
 * @author Barry
 *
 */
public class JsonString implements JsonValue {
	private String value = "";
	
	public JsonString() {
		super();
	}

	public JsonString(String value) {
		super();
		this.value = value;
	}

	@Override
	public boolean isBoolean() {
		return false;
	}

	@Override
	public boolean isString() {
		return true;
	}

	@Override
	public boolean isNumber() {
		return false;
	}

	@Override
	public boolean isObject() {
		return false;
	}

	@Override
	public boolean isArray() {
		return false;
	}

	@Override
	public boolean isNull() {
		return false;
	}
	
	public String getValue() {
		return value;
	}
	
	public void setValue(String value) {
		this.value = value;
	}
	
	public String toString() {
		return "\"" + value + "\"";
	}
}
